/*******************************************************************************
Replication Materials for Blau, Kahn, Brummund, Cook, and Larson-Koester "Is 
There Still Son Preference in the United States?"

Run Analysis

Date Modified: 11/06/2019

*******************************************************************************/

*To replicate, set location of replication folder below

global main "S:\KahnRA\sonpref\Son Preference Replication Materials"

/*******************************************************************************

I. Stata Preliminaries

*******************************************************************************/

*** A. Settings
clear all
set more off
set matsize 1000

*** B. Auxiliary programs

*ssc install outreg2, replace

/*******************************************************************************

II. Directories

*******************************************************************************/

global data "$main\Analysis Data"
global cps "$data\CPS"
global acs "$data\ACS"
global dm "$data\DM"

global toutput "$main\Main Table Output"
global foutput "$main\Main Figure Output"
global routput "$main\Robustness\Robustness Output"

global code "$main\Main Code"
global rcode "$main\Robustness\Robustness Code"


/*******************************************************************************

III. Run Main Output

*******************************************************************************/

*** A. Figures

do "$code\figure_1.do"
do "$code\figure_2.do"
do "$code\figure_3.do"
do "$code\figure_4.do"
do "$code\figure_5.do"


*** B. Tables

do "$code\Table 1.do"
do "$code\Table 2.do"
do "$code\Table 2 contd.do"
do "$code\Table 3.do"
do "$code\Table 4.do"
do "$code\Table 5.do"
do "$code\Table 6.do"
do "$code\Table A1.do"
do "$code\Table A2.do"
do "$code\Table A3.do"
do "$code\Table A4.do"


/*******************************************************************************

IV. Run Robustness Output

*******************************************************************************/
do "$rcode\Figure R1 - F5 for Extended Sample.do"
do "$rcode\Table R1 - Spacing.do"
do "$rcode\Table R2 - T3 for All Women.do"
do "$rcode\Table R3 - AT4, No Spousal Controls.do"
do "$rcode\Table R4 - T1, Age At 1st Birth Ctrl.do"
do "$rcode\Table R5 - T2, Age At 1st Birth Ctrl.do"
do "$rcode\Table R6 - T3, Age At 1st Birth Ctrl.do"
do "$rcode\Table R7 - T4, Age At 1st Birth Ctrl.do"
do "$rcode\Table R8 - T5, Age At 1st Birth Ctrl.do"
do "$rcode\Table R9 - T4 for All Women.do"
do "$rcode\Table R10 - T5 for All Women.do"
do "$rcode\Table R11 - T4 for 2008-13.do"
do "$rcode\Table R12 - T3 For First Marriage.do"
do "$rcode\Table R13 - AT4 for Extended Sample.do"
do "$rcode\Table R14 - T3 For Extended Sample.do"
do "$rcode\Table R15 - T2 Cont, Age At 1st Birth Ctrl.do"
do "$rcode\Table R16 - Table 4 for Extended Sample.do"
do "$rcode\Table R17 - Table 5 for Extended Sample.do"
do "$rcode\Table R18 - Table A1 for Extended Sample.do"